import {setSession} from '../../../config/mUntils.js'
import { GETSECONDLIST, SEARCH } from './mutations-types'
import {getSession} from '@/config/mUntils'
export default{
  [GETSECONDLIST] (state, list) {
    // 请求状态 为200 或者304  表示成功
    if (list.status !== 200 && list.status !== 304) {
      return
    }
    state.secondList = list.data.data
    setSession('secondlist', list.data.data)
  },
  [SEARCH] (state) {
    let serchVal = getSession('search')
    let pageVal = getSession('page')
    state.search = serchVal
    state.page = pageVal
  }
}
